#include <cmath>
#include <iostream>
using namespace std;
//125 * 3574 = 446750

int* multi_aray() {

	return 0;
}

int main() {
	
	int a[3]={5,2,1};  //reverse order
	int b[4]={4,7,5,3};
	int c[7]={0,0,0,0,0,0,0},t_a,t_b;

	for (int i=0;i<4;i++) { //b
		for (int j=0;j<3;j++) { //a
			t_a=a[j]; t_b=b[i];
			c[i+j]=c[i+j]+a[j]*b[i];
		}
	}


	for (int i =0;i<7;i++) {
		if (c[i]>=10) {
			c[i+1]+=c[i]/10;
			c[i]=c[i]%10;
		}
	}

	return 0;
}